S.Node.Frame = function (option) {
    let me = this;
    Q.doSuperConstructor(me, S.Node.Frame, [option.name]);
    me.setOption(me.option);
    me.setOption(option);
};

S.Node.Frame.prototype = {
    xtype: 'frame',
    movable: false,
    selectable: false,
    padding: {
        bottom: 8
    },
    option: {
        style: {
            shape: {
                stroke: 1,
                fill: {
                    color: null
                }
            },
            layout: {
                by: {
                    path: true
                }
            },
            line: {
                cap: Q.Consts.LINE_CAP_TYPE_BUTT,
                join: Q.Consts.LINE_JOIN_TYPE_ROUND
            }
        }
    },

    setOption: function (option) {
        let me = this;
        S.setOption(me, option);
    },

    resize: function (offset) {
        let me = this;
        me.path.segments[1].points[1] += offset;
        me.path.segments[2].points[1] += offset;
        me.invalidate();
    }

}

Q.extend(S.Node.Frame, Q.ShapeNode);